From 3f9621dfd156f955648a0de4eeb086d1015f5ded Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 23 Jan 2010 23:32:15 +0000 Subject: [PATCH] * (bug 22245) blfilterredirect=nonredirects in blredirect mode wrongly filtering If filterredir == 'nonredirects', only filter if !redirect --- RELEASE-NOTES | 1 + includes/api/ApiQueryBacklinks.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 58e90b85e4..c69dced3e0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -801,6 +801,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 22061) API: add prop=headitems to action=parse * (bug 22240) API: include time in siteinfo * (bug 22241) Quick edit is still using the deprecated watch parameter (API: Setting default for watch/unwatch wrongly set) +* (bug 22245) blfilterredirect=nonredirects in blredirect mode wrongly filtering === Languages updated in 1.16 === diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index 2ec54f72be..ea3a6df492 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -122,7 +122,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { if ( $this->params['filterredir'] == 'redirects' ) $this->addWhereFld( 'page_is_redirect', 1 ); - else if ( $this->params['filterredir'] == 'nonredirects' ) + else if ( $this->params['filterredir'] == 'nonredirects' && !$this->redirect ) //bug 22245 - Check for !redirect, as filtering nonredirects, when getting what links to them is contradictory $this->addWhereFld( 'page_is_redirect', 0 ); $this->addOption( 'LIMIT', $this->params['limit'] + 1 ); -- 2.20.1